﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using VideoClassLibrary.BusinessLogicLayer;
using VideoClassLibrary.Model;

public partial class TopFrame : AdminUserBase
{
    public string SchoolLink;
    public V_School CurrentSchool;
    protected void Page_Load(object sender, EventArgs e)
    {
        Response.ExpiresAbsolute = DateTime.Now.AddDays(-1);
        Response.Cache.SetExpires(DateTime.Now.AddDays(-1));
        Response.Expires = 0;
        Response.CacheControl = "no-cache";
        Response.Cache.SetNoStore();
        Ajax.Utility.RegisterTypeForAjax(typeof(AjaxMethodHelper));
        if (!IsPostBack)
        {
            SchoolModule schoolModule = new SchoolModule();
            CurrentSchool = schoolModule.GetSchoolModelById(this.SchoolID);
            SchoolLink = PageHelper.GetWebConfigValue("BaseUrl") + "?SchoolID=" + this.SchoolID;

        }
        LoadMenu();
    }

    protected void LoadMenu()
    {
        if (this.SchoolID > 0)//学校管理员
        {

            switch (AdminType)
            {
                case 1:
                  
                    spanUserType.InnerHtml = "学校管理员";
                    break;
                case 2:
                     
                    spanUserType.InnerHtml = "课程内务";
                    break;
                case 4:
                     
                    spanUserType.InnerHtml = "网站编辑";
                    break;
                case 3:
                    
                    spanUserType.InnerHtml = "招生负责人";
                    break;
            }


        }
        else if (AdminType == 0)
        {
            
            spanUserType.InnerHtml = "运营管理员";
        }

    }

}
